import { getPrescriptionPic } from "@/api/consult"
import { showImagePreview } from "vant"

// 查看处方
export const useLookPre = () => {
    const lookPre = async (id:string) => {
        if(!id) return
        await getPrescriptionPic(id).then((res) => {
          if (res) {
            showImagePreview([res.data.url])
          }
        }).catch((err) => {
          console.log(err);
        })
      }
    return {lookPre}
}
